#include "Settings.h"
#include "../Iniparser/iniparser.h"

#include <cassert>

bool GameSettingsManager::SetDefault()
{
	m_gs.gameName = "Zalcetto2";
	m_gs.mainWindowWidth = 800;
	m_gs.mainWindowHeight = 600;
	m_gs.mainWindowPosX = 0; //unused at the moment
	m_gs.mainWindowPosY = 0; //unused at the moment
	m_gs.mainWindowfullScreen = false;

	return true;
}

bool GameSettingsManager::Load(const char* const i_filename)
{
	assert(i_filename);
	dictionary * dict = iniparser_load(i_filename);

	//... should read these from the inifile!
	const bool ret = SetDefault();

	if(dict)
		iniparser_freedict(dict);

	return ret;
}

bool GameSettingsManager::Save(const char* const /*i_filename*/) const
{
	return false;
}
